package com.dragon.test.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.dragon.test.bean.Person;
import com.dragon.test.dao.IPersonDao;
import com.dragon.test.service.IPersonService;

@Service
public class PersonServiceImpl implements IPersonService {

	@Autowired
	IPersonDao personDao;

	@Override
	@Transactional // 声明事务必须3
	public int add(Person person) {
		return personDao.add(person);
	}

}
